<template>
  <div class="sv-pagination">
    <el-pagination
      v-bind="$attrs"
      v-model:current-page="paging.pageNum"
      v-model:page-size="paging.pageSize"
      :page-sizes="[5, 10, 20, 40, 80]"
      :pager-count="5"
      layout="total, sizes, prev, pager, next, jumper"
    />
  </div>
</template>

<script setup>
// 双向绑定分页参数
const paging = defineModel('paging', {
  type: Object,
  default: () => {
    return {
      pageNum: 1,
      pageSize: 20
    }
  }
})
</script>

<style lang="scss">
.sv-pagination {
  display: flex;
  justify-content: flex-end;
}
</style>
